/*
 * Description: v-blur: input失去焦点
 * Company: 联宝（合肥）电子科技有限公司
 * Author: Qiuxue.Wu
 * Date: 2020/6/12 17:52
 */

export default {
  inserted(el, binding, vnode) {
    el.children[0].onblur = function(e) {
      if (
        typeof binding.value[binding.arg] !== 'undefined' &&
        binding.value[binding.arg] !== null
      ) {
        binding.value[binding.arg] = String(binding.value[binding.arg]).trim()
      }
    }
  }
}
